﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:CustomControls" >

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="resColorsOfficeButton.xaml" />
        <ResourceDictionary Source="resXSButtonStyles.xaml" />
    </ResourceDictionary.MergedDictionaries>
    
    
    <Style x:Key="TitleBarStyle" TargetType="{x:Type Border}" >
        <Setter Property="Background" Value="{StaticResource brushTitleBar}" />
        <Setter Property="BorderBrush" Value="{StaticResource brushBorder}" />
        <Setter Property="BorderThickness" Value="6,6,6,0" />
        <Setter Property="CornerRadius" Value="16,16,0,0" />
    </Style>
    
    
    <Style x:Key="TitleStyle" TargetType="{x:Type TextBlock}" >
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="FontWeight" Value="Bold" />
        <Setter Property="Foreground" Value="{StaticResource brushTitleBarText}" />
    </Style>
    
    
    <Style x:Key="TitleDividingLineStyle" TargetType="{x:Type Separator}" >
        <Setter Property="BorderBrush" Value="LightBlue" />
        <Setter Property="BorderThickness" Value="6" />
        <Setter Property="VerticalAlignment" Value="Bottom" />
    </Style>

    
    <Style x:Key="OfficeButtonStyle" TargetType="{x:Type local:XSButton}"
           BasedOn="{StaticResource {ComponentResourceKey {x:Type local:XSButton}, Elliptical}}">
        <Setter Property="Height" Value="38" />
        <Setter Property="Width" Value="38" />
        <Setter Property="CornerRadius" Value="19" />
        <Setter Property="Background" Value="{StaticResource brushOfficeButton}" />
        <Setter Property="GlowColor" Value="{StaticResource brushOfficeButtonGlow}" />
        <Setter Property="HighlightBrightness" Value="180" />
    </Style>
    
    
    <Style x:Key="InfoButtonStyle" TargetType="{x:Type local:XSButton}"
           BasedOn="{StaticResource {ComponentResourceKey {x:Type local:XSButton}, Elliptical}}">
        <Setter Property="Height" Value="26" />
        <Setter Property="Width" Value="26" />
        <Setter Property="CornerRadius" Value="13" />
        <Setter Property="Background" Value="{StaticResource brushInfoButton}" />
        <Setter Property="GlowColor" Value="{StaticResource brushInfoButtonGlow}" />
        <Setter Property="Foreground" Value="{StaticResource brushInfoButtonForeground}" />
        <Setter Property="HighlightBrightness" Value="170" />
        <Setter Property="FontWeight" Value="Bold" />
        <Setter Property="FontStyle" Value="Italic" />
        <Setter Property="FontSize" Value="14" />
        <Setter Property="VerticalAlignment" Value="Top" />
    </Style>
    
    
    <Style x:Key="ControlButtonStyle" TargetType="{x:Type local:XSButton}"
           BasedOn="{StaticResource {ComponentResourceKey {x:Type local:XSButton}, Diffuse}}">
        <Setter Property="Height" Value="24" />
        <Setter Property="Width" Value="24" />
        <Setter Property="CornerRadius" Value="4" />
        <Setter Property="Background" Value="{StaticResource brushControlButton}" />
        <Setter Property="GlowColor" Value="{StaticResource brushControlButtonGlow}" />
        <Setter Property="HighlightBrightness" Value="120" />
    </Style>
    
    
    <Style x:Key="SystemButtonsContainerStyle" TargetType="{x:Type Control}" >
        <Setter Property="HorizontalAlignment" Value="Right" />
        <Setter Property="VerticalAlignment" Value="Top" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Control}" >
                    <StackPanel Orientation="Horizontal">
                        <local:XSButton Command="{x:Static local:CustomWindowCommands.MinimizeWindow}"
                						        Style="{StaticResource ControlButtonStyle}" >
                            <Line Stroke="{StaticResource brushControlButtonStroke}" StrokeThickness="2" X2="10" Y1="10" Y2="10" />
                        </local:XSButton>
                        <local:XSButton Command="{x:Static local:CustomWindowCommands.MaximizeWindow}"
                						        Style="{StaticResource ControlButtonStyle}" >
                            <Rectangle Stroke="{StaticResource brushControlButtonStroke}" StrokeThickness="2" Width="12" Height="12" />
                        </local:XSButton>
                        <local:XSButton Content="X" Command="ApplicationCommands.Close"
                						        Style="{StaticResource ControlButtonStyle}"
                						        Background="{StaticResource brushCloseButton}"
                						        GlowColor="{StaticResource brushCloseButtonGlow}"
                						        Foreground="{StaticResource brushCloseButtonForeground}" />
                        </StackPanel>
                    </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
    
    <Style x:Key="ClientAreaStyle" TargetType="{x:Type Border}" >
        <Setter Property="Background" Value="{StaticResource brushClientArea}" />
        <Setter Property="BorderBrush" Value="{StaticResource brushBorder}" />
        <Setter Property="BorderThickness" Value="6,0,6,0" />
    </Style>
    
    
    <Style x:Key="StatusAreaStyle" TargetType="{x:Type Border}" >
        <Setter Property="Background" Value="{StaticResource brushStatusBar}" />
        <Setter Property="BorderBrush" Value="{StaticResource brushBorder}" />
        <Setter Property="BorderThickness" Value="6,0,6,6" />
        <Setter Property="CornerRadius" Value="0,0,16,16" />
        <Setter Property="TextElement.Foreground" Value="{StaticResource brushStatusAreaText}" />
    </Style>
    
    
</ResourceDictionary>